/*
 * 文件名称: MyServer.java Copyright 2011-2016 Ximalaya All right reserved.
 */
package com.zxy.socketdemo;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @author Bird Zhang
 */
public class MyServer {
  public static void main(String[] args) throws IOException {
    ServerSocket server = new ServerSocket(5678);
    while (true) {
      Socket client = server.accept();
      System.out.println("su");
    }
    // BufferedReader in = new BufferedReader(new InputStreamReader(
    // client.getInputStream()));
    // PrintWriter out = new PrintWriter(client.getOutputStream());
    // while (true) {
    // String str = in.readLine();
    // System.out.println(str);
    // out.println("has receive....");
    // out.flush();
    // if ("end".equals(str))
    // break;
    // }
    // client.close();
  }
}